OpenShadingLanguage 1.00
# Compiled by oslc 1.10.10
# options: -q -O2 -I/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders -I/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders -o /home/sources/buildbot-worker-linux_centos7/linux_290/build/intern/cycles/kernel/shaders/node_gradient_texture.oso
shader node_gradient_texture
param	int	use_mapping	0		%read{2,2} %write{2147483647,-1}
param	matrix	mapping	0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0		%read{3,3} %write{2147483647,-1}
param	string	type	"linear"		%read{9,45} %write{2147483647,-1}
param	point	Vector	0 0 0		%read{1,1} %write{0,0} %initexpr
oparam	float	Fac	0		%read{51,51} %write{50,50}
oparam	color	Color	0 0 0		%read{2147483647,-1} %write{51,51}
global	point	P	%read{0,0} %write{2147483647,-1}
local	float	___363_x	%read{11,34} %write{5,5}
local	float	___363_y	%read{27,35} %write{6,6}
local	float	___363_z	%read{37,37} %write{7,7}
local	float	___363_result	%read{49,49} %write{8,47}
local	float	___365_r	%read{15,15} %write{14,14}
local	float	___366_r	%read{20,23} %write{19,19}
local	float	___366_t	%read{21,22} %write{20,20}
local	float	___369_r	%read{44,47} %write{41,41}
local	point	p	%read{3,7} %write{1,3}
const	string	$const1	"gradient"		%read{4,4} %write{2147483647,-1}
const	int	$const2	0		%read{5,5} %write{2147483647,-1}
const	int	$const3	1		%read{6,6} %write{2147483647,-1}
const	int	$const4	2		%read{7,7} %write{2147483647,-1}
const	float	$const5	0		%read{8,50} %write{2147483647,-1}
const	string	$const6	"linear"		%read{9,9} %write{2147483647,-1}
temp	int	$tmp1	%read{10,10} %write{9,9}
const	string	$const7	"quadratic"		%read{12,12} %write{2147483647,-1}
temp	int	$tmp2	%read{13,13} %write{12,12}
const	string	$const8	"easing"		%read{16,16} %write{2147483647,-1}
temp	int	$tmp3	%read{17,17} %write{16,16}
temp	float	$tmp4	%read{19,19} %write{18,18}
const	float	$const9	1		%read{19,49} %write{2147483647,-1}
const	float	$const10	3		%read{21,21} %write{2147483647,-1}
temp	float	$tmp5	%read{24,24} %write{21,21}
const	float	$const11	2		%read{22,22} %write{2147483647,-1}
temp	float	$tmp6	%read{23,23} %write{22,22}
temp	float	$tmp7	%read{24,24} %write{23,23}
const	string	$const12	"diagonal"		%read{25,25} %write{2147483647,-1}
temp	int	$tmp8	%read{26,26} %write{25,25}
temp	float	$tmp9	%read{28,28} %write{27,27}
const	float	$const13	0.5		%read{28,33} %write{2147483647,-1}
const	string	$const14	"radial"		%read{29,29} %write{2147483647,-1}
temp	int	$tmp10	%read{30,30} %write{29,29}
temp	float	$tmp11	%read{32,32} %write{31,31}
const	float	$const15	6.28318548		%read{32,32} %write{2147483647,-1}
temp	float	$tmp12	%read{33,33} %write{32,32}
temp	float	$tmp13	%read{40,40} %write{39,39}
temp	float	$tmp14	%read{36,36} %write{34,34}
temp	float	$tmp15	%read{36,36} %write{35,35}
temp	float	$tmp16	%read{38,38} %write{36,36}
temp	float	$tmp17	%read{38,38} %write{37,37}
temp	float	$tmp18	%read{39,39} %write{38,38}
temp	float	$tmp19	%read{41,41} %write{40,40}
const	string	$const16	"quadratic_sphere"		%read{42,42} %write{2147483647,-1}
temp	int	$tmp20	%read{43,43} %write{42,42}
const	string	$const17	"spherical"		%read{45,45} %write{2147483647,-1}
temp	int	$tmp21	%read{46,46} %write{45,45}
const	string	$const18	"clamp"		%read{48,48} %write{2147483647,-1}
temp	float	$tmp22	%read{50,50} %write{49,49}
code Vector
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:66
#     point Vector = P,
	assign		Vector P 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{66} %argrw{"wr"}
code ___main___
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:70
#   point p = Vector;
	assign		p Vector 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{70} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:72
#   if (use_mapping)
	if		use_mapping 4 4 	%line{72} %argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:73
#     p = transform(mapping, p);
	transform	p mapping p 	%line{73} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:75
#   Fac = gradient(p, type);
	functioncall	$const1 51 	%line{75} %argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:25
#   x = p[0];
	compref		___363_x p $const2 	%line{25} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:26
#   y = p[1];
	compref		___363_y p $const3 	%line{26} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:27
#   z = p[2];
	compref		___363_z p $const4 	%line{27} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:29
#   float result = 0.0;
	assign		___363_result $const5 	%line{29} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:31
#   if (type == "linear") {
	eq		$tmp1 type $const6 	%line{31} %argrw{"wrr"}
	if		$tmp1 12 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:32
#     result = x;
	assign		___363_result ___363_x 	%line{32} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:34
#   else if (type == "quadratic") {
	eq		$tmp2 type $const7 	%line{34} %argrw{"wrr"}
	if		$tmp2 16 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:35
#     float r = max(x, 0.0);
	max		___365_r ___363_x $const5 	%line{35} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:36
#     result = r * r;
	mul		___363_result ___365_r ___365_r 	%line{36} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:38
#   else if (type == "easing") {
	eq		$tmp3 type $const8 	%line{38} %argrw{"wrr"}
	if		$tmp3 25 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:39
#     float r = min(max(x, 0.0), 1.0);
	max		$tmp4 ___363_x $const5 	%line{39} %argrw{"wrr"}
	min		___366_r $tmp4 $const9 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:40
#     float t = r * r;
	mul		___366_t ___366_r ___366_r 	%line{40} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:42
#     result = (3.0 * t - 2.0 * t * r);
	mul		$tmp5 $const10 ___366_t 	%line{42} %argrw{"wrr"}
	mul		$tmp6 $const11 ___366_t 	%argrw{"wrr"}
	mul		$tmp7 $tmp6 ___366_r 	%argrw{"wrr"}
	sub		___363_result $tmp5 $tmp7 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:44
#   else if (type == "diagonal") {
	eq		$tmp8 type $const12 	%line{44} %argrw{"wrr"}
	if		$tmp8 29 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:45
#     result = (x + y) * 0.5;
	add		$tmp9 ___363_x ___363_y 	%line{45} %argrw{"wrr"}
	mul		___363_result $tmp9 $const13 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:47
#   else if (type == "radial") {
	eq		$tmp10 type $const14 	%line{47} %argrw{"wrr"}
	if		$tmp10 34 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:48
#     result = atan2(y, x) / M_2PI + 0.5;
	atan2		$tmp11 ___363_y ___363_x 	%line{48} %argrw{"wrr"}
	div		$tmp12 $tmp11 $const15 	%argrw{"wrr"}
	add		___363_result $tmp12 $const13 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:51
#     float r = max(1.0 - sqrt(x * x + y * y + z * z), 0.0);
	mul		$tmp14 ___363_x ___363_x 	%line{51} %argrw{"wrr"}
	mul		$tmp15 ___363_y ___363_y 	%argrw{"wrr"}
	add		$tmp16 $tmp14 $tmp15 	%argrw{"wrr"}
	mul		$tmp17 ___363_z ___363_z 	%argrw{"wrr"}
	add		$tmp18 $tmp16 $tmp17 	%argrw{"wrr"}
	sqrt		$tmp13 $tmp18 	%argrw{"wr"}
	sub		$tmp19 $const9 $tmp13 	%argrw{"wrr"}
	max		___369_r $tmp19 $const5 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:53
#     if (type == "quadratic_sphere")
	eq		$tmp20 type $const16 	%line{53} %argrw{"wrr"}
	if		$tmp20 45 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:54
#       result = r * r;
	mul		___363_result ___369_r ___369_r 	%line{54} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:55
#     else if (type == "spherical")
	eq		$tmp21 type $const17 	%line{55} %argrw{"wrr"}
	if		$tmp21 48 48 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:56
#       result = r;
	assign		___363_result ___369_r 	%line{56} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:59
#   return clamp(result, 0.0, 1.0);
	functioncall	$const18 51 	%line{59} %argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h:163
# float  clamp (float x, float minval, float maxval) { return max(min(x,maxval),minval); }
	min		$tmp22 ___363_result $const9 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders/stdosl.h"} %line{163} %argrw{"wrr"}
	max		Fac $tmp22 $const5 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl:76
#   Color = color(Fac, Fac, Fac);
	color		Color Fac Fac Fac 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{76} %argrw{"wrrr"}
	end
